TEMPLATE = lib
TARGET = ecdriver
CONFIG += c++11 shared
CONFIG -= app_bundle
CONFIG -= qt

VERSION = 1.0.0

SOURCES += \
    device.cpp \
    ecdata.cpp \
    ecdriver.cpp \
    ecio.cpp \
    ecxml.cpp \
    eeprom.cpp \
    factory.cpp \
    inexbot.cpp \
    master.cpp \
    nowio.cpp \
    servo.cpp \
    slave.cpp \
    well.cpp

HEADERS += \
    config.h \
    ceeprom.h \
    device.h \
    ecdata.h \
    ecdriver.h \
    ecio.h \
    list.h \
    ecrt/config.h \
    ecrt/globals.h \
    ecrt/ioctl.h \
    ecrt/master.h \
    ecxml.h \
    eeprom.h \
    factory.h \
    globals.h \
    inexbot.h \
    master.h \
    mxml-private.h \
    mxmlconfig.h \
    nowio.h \
    servo.h \
    slave.h \
    well.h

INCLUDEPATH += \
    /opt/etherlab/include \
    /usr/xenomai/include \
    /usr/xenomai/include/trank \
    /usr/xenomai/include/cobalt

LIBS += \
    -lethercat_rtdm \
    -ltrank -lalchemy \
    -lcopperplate \
    -lcobalt -lmodechk \
    -lmxml

LIBS += \
    -L/opt/etherlab/lib \
    -L/usr/xenomai/lib \
    -L/usr/local/lib


DEFINES += __XENO_COMPAT__ _GNU_SOURCE  # DELAY DEBUG_PDO
QMAKE_CXXFLAGS += \
    -g -std=c++11

QMAKE_LFLAGS   += \
    -Wl,@/usr/xenomai/lib/modechk.wrappers \
    -Wl,@/usr/xenomai/lib/cobalt.wrappers \
    -Wl,-rpath,/opt/etherlab/lib \
    -Wl,-rpath,/usr/xenomai/lib \
    -Wl,-rpath,/usr/local/lib

DESTDIR = $$PWD/lib
